//package com.reliable.service.controller;
//
//import java.util.List;
//
//import cn.hutool.core.bean.BeanUtil;
//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
//import com.reliable.api.dto.user.ReliableUserLite;
//import com.reliable.api.param.IdParam;
//import com.reliable.api.param.user.NotificationConfigSaveParam;
//import com.reliable.api.param.user.NotificationConfigUpStatusParam;
//import com.reliable.api.param.user.NotificationConfigUpdateParam;
//import com.reliable.common.core.domain.AjaxResult;
//import com.reliable.framework.utils.JwtUtils;
//import com.reliable.service.domain.ReliableUserNotificationConfig;
//import com.reliable.service.service.IReliableUserNotificationConfigService;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
///**
// * 用户推送配置Controller
// *
// * @author ruoyi
// * @date 2025-07-09
// */
//@RestController
//@RequestMapping("/reliable/notificationConfig")
//@Api(value = "用户推送配置控制器", tags = {"用户推送配置管理"})
//public class ReliableUserNotificationConfigController {
//
//    @Autowired
//    private IReliableUserNotificationConfigService reliableUserNotificationConfigService;
//
//
//    /**
//     * 添加用户推送配置信息
//     */
//    @PostMapping("/save")
//    @ApiOperation(value = "添加用户推送配置信息")
//    public AjaxResult save(@RequestBody NotificationConfigSaveParam  param) {
//        ReliableUserLite currentUser = JwtUtils.getCurrentUser();
//
//        ReliableUserNotificationConfig reliableUserNotificationConfig = new ReliableUserNotificationConfig();
//        BeanUtil.copyProperties(param, reliableUserNotificationConfig);
//        reliableUserNotificationConfig.setUserId(currentUser.getId());
//        boolean result = reliableUserNotificationConfigService.save(reliableUserNotificationConfig);
//        return result ? AjaxResult.success() : AjaxResult.error();
//    }
//
//    /**
//     * 查询单当前用户的配置信息
//     */
//    @PostMapping("/list")
//    public AjaxResult list(@RequestBody IdParam  param) {
//        List<ReliableUserNotificationConfig> list = reliableUserNotificationConfigService.list(new LambdaQueryWrapper<ReliableUserNotificationConfig>()
//                .eq(ReliableUserNotificationConfig::getUserId, param.getId()));
//        return AjaxResult.success(list);
//    }
//
//    /**
//     * 修改用户推送配置信息
//     */
//
//    @PostMapping("/update")
//    public AjaxResult update(@RequestBody NotificationConfigUpdateParam param) {
//
//        return reliableUserNotificationConfigService.updateNotificationConfig(param);
//    }
//
//    /**
//     * 修改用户推送配置状态
//     */
//    @ApiOperation("修改用户推送配置状态")
//    @PostMapping("/updateStatus")
//    public AjaxResult updateStatus(@RequestBody NotificationConfigUpStatusParam  param)
//    {
//        return reliableUserNotificationConfigService.updateStatus(param);
//    }
//
//
//
////    /**
////     * 查询用户推送配置列表
////     */
////    @ApiOperation("查询用户推送配置列表")
////    @PreAuthorize("@ss.hasPermi('system:config:list')")
////    @GetMapping("/list")
////    public TableDataInfo list(reliableUserNotificationConfig reliableUserNotificationConfig) {
////        startPage();
////        List<reliableUserNotificationConfig> list = reliableUserNotificationConfigService.list(new QueryWrapper<reliableUserNotificationConfig>(reliableUserNotificationConfig));
////        return getDataTable(list);
////    }
////
////    /**
////     * 导出用户推送配置列表
////     */
////    @ApiOperation("导出用户推送配置列表")
////    @PreAuthorize("@ss.hasPermi('system:config:export')")
////    @Log(title = "用户推送配置", businessType = BusinessType.EXPORT)
////    @GetMapping("/export")
////    public AjaxResult export(reliableUserNotificationConfig reliableUserNotificationConfig) {
////        List<reliableUserNotificationConfig> list = reliableUserNotificationConfigService.list(new QueryWrapper<reliableUserNotificationConfig>(reliableUserNotificationConfig));
////        ExcelUtil<reliableUserNotificationConfig> util = new ExcelUtil<reliableUserNotificationConfig>(reliableUserNotificationConfig.class);
////        return util.exportExcel(list, "用户推送配置数据");
////    }
////
////    /**
////     * 获取用户推送配置详细信息
////     */
////    @ApiOperation("获取用户推送配置详细信息")
////    @PreAuthorize("@ss.hasPermi('system:config:query')")
////    @GetMapping(value = "/{id}")
////    public AjaxResult getInfo(@PathVariable("id") Long id) {
////        return AjaxResult.success(reliableUserNotificationConfigService.getById(id));
////    }
////
////    /**
////     * 新增用户推送配置
////     */
////    @ApiOperation("新增用户推送配置")
////    @PreAuthorize("@ss.hasPermi('system:config:add')")
////    @Log(title = "用户推送配置", businessType = BusinessType.INSERT)
////    @PostMapping
////    public AjaxResult add(@RequestBody reliableUserNotificationConfig reliableUserNotificationConfig) {
////        return toAjax(reliableUserNotificationConfigService.save(reliableUserNotificationConfig));
////    }
////
////    /**
////     * 修改用户推送配置
////     */
////    @ApiOperation("修改用户推送配置")
////    @PreAuthorize("@ss.hasPermi('system:config:edit')")
////    @Log(title = "用户推送配置", businessType = BusinessType.UPDATE)
////    @PutMapping
////    public AjaxResult edit(@RequestBody reliableUserNotificationConfig reliableUserNotificationConfig) {
////        return toAjax(reliableUserNotificationConfigService.updateById(reliableUserNotificationConfig));
////    }
////
////    /**
////     * 删除用户推送配置
////     */
////    @ApiOperation("删除用户推送配置")
////    @PreAuthorize("@ss.hasPermi('system:config:remove')")
////    @Log(title = "用户推送配置", businessType = BusinessType.DELETE)
////	@DeleteMapping("/{ids}")
////    public AjaxResult remove(@PathVariable Long[] ids) {
////        return toAjax(reliableUserNotificationConfigService.removeByIds(Arrays.asList(ids)));
////    }
//}
